import React, { Component } from 'react';
import {
  StyleSheet,
  Text,
  View,
  TouchableOpacity
} from 'react-native';
import { Actions } from 'react-native-router-flux';
import FolderComponent from './FolderComponent'
import Icon from 'react-native-vector-icons/FontAwesome';
import EvilIcon from 'react-native-vector-icons/EvilIcons'
const PageOne = () => {
    return (
        <View style={styles.container}>
          <TouchableOpacity  onPress={() => Actions.searchPage()}>
            <View style={styles.searchButt}>
                <EvilIcon
                    style={styles.searchIcon}
                    name={'search'} // 图标 调用传入的属性
                    size={18}></EvilIcon>
                <Text style={styles.serachText}>搜索</Text>
              </View>
          </TouchableOpacity>
          <FolderComponent></FolderComponent>
        </View>
    );
}

const styles = StyleSheet.create({
  container: {
    backgroundColor: '#fff',
  },
  searchButt: {
    borderColor: '#f3f3f3',
    borderWidth: 1,
    borderStyle: 'solid',
    backgroundColor: '#f0f4f7',
    flexDirection: 'row',
    textAlign: 'center',
    color: '#ccc',
    alignItems: 'center',
    justifyContent: 'center',
    marginTop: 4,
    marginBottom: 4,
    marginLeft: 10,
    marginRight: 10,
    borderRadius: 4,
    padding: 5,
  } ,
  searchIcon: {//搜索图标
      marginRight: 5,
      color: '#ccc'
  },
  serachText:{
    color: '#ccc',
  }
    
});

export default PageOne;
